﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%@page import="java.io.InputStream"%>
<%@page import="org.apache.ibatis.io.Resources"%>
<%@page import="org.apache.ibatis.session.SqlSessionFactory"%>
<%@page import="org.apache.ibatis.session.SqlSession"%>
<%@page import="java.io.IOException"%>
<%@page import="org.apache.ibatis.session.SqlSessionFactoryBuilder"%>
<%@page import="util.Info"%>
<%@page import="dao.CommDAO"%>
<%@page import="util.PageManager"%>
 
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="桌面壁纸网站 - Clean HTML5 and CSS3 responsive template">
<meta name="author" content="MyPassion">

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<title>桌面壁纸网站 - Responsive HTML5 and CSS3 </title>

<link rel="shortcut icon" href="img/sms-4.ico" />

<!-- STYLES -->
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/superfish.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/fontello/fontello.css" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/flexslider.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/ui.css" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/base.css" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/style.css" />
<link rel="stylesheet" type="text/css" href="/wallpaper/frontfiles/css/960.css" /> 
 
<!--[if lt IE 9]> <script type="text/javascript" src="/wallpaper/frontfiles/js/customM.js"></script> <![endif]-->

 

</head>

<% 
HashMap ext = new HashMap(); 
String tglparentid=request.getParameter("tglparentid")==null?"":request.getParameter("tglparentid"); 
ext.put("tglparentid",tglparentid); 
ext.put("utype","管理员"); 
ext.put("status","正常"); 
new CommDAO().insert(request,response,"sysuser",ext,true,false); 
%>
<body>

<!-- Body Wrapper -->
<div class="body-wrapper">
	<div class="controller">
    <div class="controller2">

<jsp:include page="../top.jsp"></jsp:include>
       
<!-- servletformstart 
<form  action="/wallpaper/wallpaper?ac=sysusertj&tglparentid=<%=tglparentid%>"     style="display: inline;font-size: 15px" name="f1" method="post"  onsubmit="return checkform()" >
 servletformend -->
<!-- s2formstart -->
<form name="f1" method="post" onsubmit="return checkform()" action="/wallpaper/wallpaper/sysusertj.do?tglparentid=<%=tglparentid%>" > 
<!-- s2formend -->
<center>
<table style="margin-top:0px;"  class="table1"  align="center" width="99%">

<thead>
<tr>
<td height="32" style="background-color: #fafafa" colspan="2"  align="left">
<font style="font-size: 15px;color: #EB5253">&nbsp;&nbsp;您当前的位置 : 信息添加</font></td> 
</tr> 
</thead>

<tr>
<td width="21%" height="32" align="center">用户名</td>
<td width="79%" align="left"  style="padding-left: 5px"><input type=text  onblur='checkform()' class='' id='uname' name='uname' size=35 /><label style='display:inline' id='clabeluname' /></td>
</tr>
<tr>
<td width="21%" height="32" align="center">密码</td>
<td width="79%" align="left"  style="padding-left: 5px"><input type=text  onblur='checkform()' class='' id='upass' name='upass' size=35 /><label style='display:inline' id='clabelupass' /></td>
</tr>
<tr>
<td width="21%" height="32" align="center">姓名</td>
<td width="79%" align="left"  style="padding-left: 5px"><input type=text  onblur='checkform()' class='' id='tname' name='tname' size=35 /><label style='display:inline' id='clabeltname' /></td>
</tr>
<tr>
<td width="21%" height="32" align="center">身份证号</td>
<td width="79%" align="left"  style="padding-left: 5px"><input type=text  onblur='checkform()' class='' id='sfid' name='sfid' size=35 /><label style='display:inline' id='clabelsfid' /></td>
</tr>
<tr>
<td width="21%" height="32" align="center">性别</td>
<td width="79%" align="left"  style="padding-left: 5px"><span id="sexdanx"><label  style='display:inline' ><input type=radio checked=checked name='sex' id='sex' value='男' />&nbsp;男 </label>&nbsp;
<label  style='display:inline' ><input type=radio  name='sex' id='sex' value='女' />&nbsp;女 </label>&nbsp;
</span></td>
</tr>
<tr>
<td width="21%" height="32" align="center">出生日期</td>
<td width="79%" align="left"  style="padding-left: 5px"><input type=text  onblur='checkform()'  size='12' class=''   name='birth'  id='birth' onclick='WdatePicker();'  /><label id='clabelbirth' /></td>
</tr>
<tr>
<td width="21%" height="32" align="center">电话</td>
<td width="79%" align="left"  style="padding-left: 5px"><input type=text  onblur='checkform()' class='' id='tel' name='tel' size=35 /><label style='display:inline' id='clabeltel' /></td>
</tr>
<tr>
<td width="21%" height="32" align="center">地址</td>
<td width="79%" align="left"  style="padding-left: 5px"><input type=text  onblur='checkform()' class='' id='addrs' name='addrs' size=60 /><label style='display:inline' id='clabeladdrs' /></td>
</tr>
<tr>
<td width="21%" height="32" align="center">邮箱</td>
<td width="79%" align="left"  style="padding-left: 5px"><input type=text  onblur='checkform()' class='' id='email' name='email' size=35 /><label style='display:inline' id='clabelemail' /></td>
</tr>
<tr>
<td width="21%" height="32" align="center">相片</td>
<td width="79%" align="left"  style="padding-left: 5px"><%=Info.getImgUpInfo(65)%></td>
</tr>


<tr>
<td height="35" align="center" colspan="2">

<label>
<input  type="button"  onclick="if(checkform()){f1.submit();}"   name="button" id="button" value="提交信息" />
</label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                      
<input type=button value='返回上页' onclick='window.location.replace("sysusercx.jsp")' />                               
</td> 
</tr>

<tbody>
</tbody>
</table>
</center>
</form>

        
        <jsp:include page="foot.jsp"></jsp:include>
        
        
         
    
    </div>
	</div>
</div>
<!-- / Body Wrapper -->


<!-- SCRIPTS -->
<script type="text/javascript" src="/wallpaper/frontfiles/js/jquery.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/easing.min.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/1.8.2.min.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/ui.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/carouFredSel.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/superfish.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/customM.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/flexslider-min.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/tweetable.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/timeago.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/jflickrfeed.min.js"></script>
<script type="text/javascript" src="/wallpaper/frontfiles/js/mobilemenu.js"></script>

<!--[if lt IE 9]> <script type="text/javascript" src="/wallpaper/frontfiles/js/html5.js"></script> <![endif]-->
<script type="text/javascript" src="/wallpaper/frontfiles/js/mypassion.js"></script>


</body>
</html>
 
<script type="text/javascript">
<!--
<%
if(request.getAttribute("error")!=null){
%>
alert("用户名或密码错误");
<%}%>

<%
if(request.getAttribute("random")!=null){
%>
alert("验证码错误");
<%}%>

document.getElementById("uname").focus();

//-->
</script> 
            <script language=javascript src='/wallpaper/js/My97DatePicker/WdatePicker.js'></script>
<script language=javascript src='/wallpaper/js/popup.js'></script>
<script language=javascript src='/wallpaper/js/ajax.js'></script>
<%@page import="util.Info"%>
<%@page import="util.Info"%> 
<%@page import="java.util.ArrayList"%> 
<%@page import="java.util.HashMap"%> 
<%@page import="util.PageManager"%> 
<%@page import="dao.CommDAO"%> 
<script language=javascript >  
 
 function checkform(){  
var unameobj = document.getElementById("uname");  
if(unameobj.value==""){  
document.getElementById("clabeluname").innerHTML="&nbsp;&nbsp;<font color=red>请输入用户名</font>";  
return false;  
}else{
document.getElementById("clabeluname").innerHTML="  ";  
}  
  
var unameobj = document.getElementById("uname");  
if(unameobj.value!=""){  
var ajax = new AJAX();
//ajax.post(encodeURI("/wallpaper/factory/checkno.jsp?table=sysuser&col=uname&value="+unameobj.value+"&checktype=insert&ttime=<%=Info.getDateStr()%>")) 
ajax.post("/wallpaper/factory/checkno.jsp?table=sysuser&col=uname&value="+unameobj.value+"&checktype=insert&ttime=<%=Info.getDateStr()%>") 
var msg = ajax.getValue();
if(msg.indexOf('Y')>-1){
document.getElementById("clabeluname").innerHTML="&nbsp;&nbsp;<font color=red>用户名已存在</font>";  
return false;
}else{document.getElementById("clabeluname").innerHTML="  ";  
}  
}  
var upassobj = document.getElementById("upass");  
if(upassobj.value==""){  
document.getElementById("clabelupass").innerHTML="&nbsp;&nbsp;<font color=red>请输入密码</font>";  
return false;  
}else{
document.getElementById("clabelupass").innerHTML="  ";  
}  
  
var tnameobj = document.getElementById("tname");  
if(tnameobj.value==""){  
document.getElementById("clabeltname").innerHTML="&nbsp;&nbsp;<font color=red>请输入姓名</font>";  
return false;  
}else{
document.getElementById("clabeltname").innerHTML="  ";  
}  
  
var sfidobj = document.getElementById("sfid");  
if(sfidobj.value==""){  
document.getElementById("clabelsfid").innerHTML="&nbsp;&nbsp;<font color=red>请输入身份证号</font>";  
return false;  
}else{
document.getElementById("clabelsfid").innerHTML="  ";  
}  
  
var sfidobj = document.getElementById("sfid");  
if(sfidobj.value!=""){  
var ajax = new AJAX();
//ajax.post(encodeURI("/wallpaper/factory/checkno.jsp?table=sysuser&col=sfid&value="+sfidobj.value+"&checktype=insert&ttime=<%=Info.getDateStr()%>")) 
ajax.post("/wallpaper/factory/checkno.jsp?table=sysuser&col=sfid&value="+sfidobj.value+"&checktype=insert&ttime=<%=Info.getDateStr()%>") 
var msg = ajax.getValue();
if(msg.indexOf('Y')>-1){
document.getElementById("clabelsfid").innerHTML="&nbsp;&nbsp;<font color=red>身份证号已存在</font>";  
return false;
}else{document.getElementById("clabelsfid").innerHTML="  ";  
}  
}  
var sfidobj = document.getElementById("sfid");  
if(sfidobj.value!=""){  
var c = new RegExp();   
c = /^[A-Za-z0-9]+$/;   
if(!((sfidobj.value.length==15||sfidobj.value.length==18)&&c.test(sfidobj.value))){ 
document.getElementById("clabelsfid").innerHTML="&nbsp;&nbsp;<font color=red>身份证号为15或18位数字与字母组合</font>";  
return false;
}else{  
document.getElementById("clabelsfid").innerHTML="";  
}  
}  
var telobj = document.getElementById("tel");  
if(telobj.value!=""){  
if(telobj.value.length>11||telobj.value.length<8||isNaN(telobj.value)){ 
document.getElementById("clabeltel").innerHTML="&nbsp;&nbsp;<font color=red>电话必须为8-11位数字</font>";  
return false;
}else{  
document.getElementById("clabeltel").innerHTML="";  
}  
}  
var emailobj = document.getElementById("email");  
if(emailobj.value!=""){  
var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;  
if(!myreg.test(emailobj.value)){ 
document.getElementById("clabelemail").innerHTML="&nbsp;&nbsp;<font color=red>邮箱格式不正确</font>";  
return false;
}else{  
document.getElementById("clabelemail").innerHTML="";  
}  
}  
return true;   
}   
</script>  
